﻿using System.Collections.Generic;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Media;
using CoreClasses;
using LayoutPlanning.Views.Machines;

namespace LayoutPlanning.Model
{
    public class SaveLoadStationRelationService : ISaveLoadStationRelationService
    {
        private Station[] _stations = new Station[]
        {
            new Station()
            {
                Name = "T1",
                Position = new Point(0, 0),
                NegativeInfluence = 2,
                ControlType = ControlType.Custom,
                CustomControl = new SerializableFrameworkElement(new Machine1()),
                SizeX = 9900.453,
                SizeY = 4900.596
            },
            new Station()
            {
                Name = "T2",
                Position = new Point(0, 0),
                NegativeInfluence = 2,
                ControlType = ControlType.Custom,
                CustomControl = new SerializableFrameworkElement(new Machine2()),
                SizeX = 9300.815,
                SizeY = 10100.831
            },
            new Station()
            {
                Name = "T3",
                Position = new Point(0, 0),
                NegativeInfluence = 1,
                SizeX = 9900.051,
                SizeY = 6300.716,
                ControlType = ControlType.Custom,
                CustomControl = new SerializableFrameworkElement(new Machine3())
            }
        };

        private StationRelationModel _STR = new StationRelationModel();

        public SaveLoadStationRelationService()
        {
        }


        public async Task SaveStationRelationService(StationRelationModel stationrelations)
        {
            await Task.Run(() => { ; });
        }

        public async Task<StationRelationModel> LoadStationRelationService(string nametoLoad)
        {
            return await Task.Run(() => { return _STR; });
            ;
        }
    }
}